#ifndef SPRING_H_INCLUDED
#define SPRING_H_INCLUDED

#include "Environment.h"
#include "PointMass.h"
#include "Vector.h"

namespace BlobSalladDS
{
	class Spring
	{
		private:
			double restLength;
			double stiffness;
			double damper;
			PointMass *pointMassA;
			PointMass *pointMassB;
			Vector *tmp;
		public:
			Spring(double restLength, double stiffness, double damper, PointMass *pointMassA, PointMass *pointMassB);
			void sc(Environment &env);
			void move(double dt);
			void addForce(Vector *force);
			void draw(void * ctx, double scaleFactor);
	};
}

#endif // SPRING_H_INCLUDED
